package com.jiesen.base.modules.certificate.textbook.mapper;

import com.jiesen.base.baseDao.BaseMapper;
import com.jiesen.base.modules.certificate.textbook.model.JsVideo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.io.Serializable;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author
 * @since 2020-08-27
 */
@Mapper
public interface JsVideoMapper extends BaseMapper<JsVideo> {

    /**
     * 根据章节id和详细查询视频
     * @param tid   章节id
     * @param detailed  详细
     * @return
     */
    @Deprecated
    @Select("select  `id`,`sort`,`detailed`,`textbook_id`,`label`,`url`,`name`,`size`,`count`,`image` " +
            "from `js_video` where `textbook_id` = #{tid} and `detailed` = #{detailed} ")
    public JsVideo selectJsVideoByTextbookId(@Param("tid") Serializable tid,@Param("detailed")Integer detailed);

}